/**
 * Copyright 2004 - 2007 Blue Bamboo International Inc. 
 *           All rights reserved.
 *
 *
 * Blue Bamboo PROPRIETARY/CONFIDENTIAL.
 *
 */

package com.bambamboo.st;

/**
 * The server listen request and delegate all request to <code>IProcess</code> which now can be access via
 * {@link ConnectionBean#getProcessor()}.
 * <p>
 * Need refactor to decouple the <code>ConnectionBean</code> with </code>IProcess</code>, put <code>IProcess</code> as a
 * member of IOServer directly.
 * </p>
 * 
 * @author Nick.Tan
 * @since 1.0.0
 */
public abstract class AbstractIOServer {

	private ConnectionBean connectionBean;

	/**
	 * init and startup the server
	 * 
	 * @throws Exception
	 */
	abstract public void startup() throws Exception;

	/**
	 * tell the server type
	 * 
	 * @return the server type, e.g. <code>TCP</code>, <code>SSL</code>, <code>HTTP</code>, <code>HTTPS</code>
	 */
	abstract public String getType();

	public ConnectionBean getConnectionBean() {
		return connectionBean;
	}

	public void setConnectionBean(ConnectionBean connectionBean) {
		this.connectionBean = connectionBean;
	}
}
